<template>
	<view>
		<u-modal :show="show" @confirm="confirm" @close="close" closeOnClickOverlay="true">
			<text class="nickname">{{title}}</text>
			<view class="Text-box">
				<u--input border="surround" :value="value" @input="input($event)" ></u--input>
			</view>
		</u-modal>
		<view class="Mine-though" @click="show = true">
			<text>{{title}}</text>
			<view class="arrowhead">
				<text class="though">{{value}}</text>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['value','title'],
		data() {
			return {
				show: false,
			}
		},
		methods: {
			confirm() {
				this.show = false
			},
			close() {
				this.show = false
			},
			input(value) {
				console.log(value);
				this.$emit('input',value)
			}
		}
	}
</script>

<style scoped>
	.Mine-though {
		display: flex;
		background-color: #fff;
		height: 100rpx;
		line-height: 100rpx;
		justify-content: space-between;
		border-bottom: solid #eee thin;
	}

	.Mine-though .arrowhead {
		display: flex;
	}

	.Mine-though image {
		height: 100rpx;
		width: 100rpx;
		margin-right: 40rpx;
		border-radius: 10rpx;
		border-radius: 50%;
	}

	.Mine-though text {
		margin: 0 20rpx 0 40rpx;
		font-size: 35rpx;
		font-weight: bold;
	}

	.Mine-though .arrowhead .though {
		font-weight: normal;
		margin: 0;
	}

	.nickname {
		font-weight: bold;
		font-size: 35rpx;
		margin-right: 20rpx;
		line-height: 80rpx;
	}

	.Text-box {
		width: 80%;
	}
</style>
